﻿<%@ Page Language="VB" MasterPageFile="~/HelpDesk.master" AutoEventWireup="false"
    CodeFile="DocTechniqueForm.aspx.vb" Inherits="Admin_DocTechniqueForm" Title="Documentation technique"
    Theme="HelpDesk" Culture="auto" meta:resourcekey="PageResource1" UICulture="auto" %>

<%@ Register Assembly="FredCK.FCKeditorV2" Namespace="FredCK.FCKeditorV2" TagPrefix="FCKeditorV2" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <asp:SqlDataSource ID="SqlDocTech" runat="server" ConnectionString="<%$ ConnectionStrings:HelpDeskCS %>"
        SelectCommand="SELECT [doctechnique_id], [entreprise_id], [doctechnique_sujet], [doctechnique_contenu] FROM [DocTechnique] WHERE ([doctechnique_id] = @doctechnique_id)"
        DeleteCommand="DELETE FROM [DocTechnique] WHERE [doctechnique_id] = @doctechnique_id"
        InsertCommand="INSERT INTO [DocTechnique] ([entreprise_id], [doctechnique_sujet], [doctechnique_contenu]) VALUES (@entreprise_id, @doctechnique_sujet, @doctechnique_contenu)"
        UpdateCommand="UPDATE [DocTechnique] SET [entreprise_id] = @entreprise_id, [doctechnique_sujet] = @doctechnique_sujet, [doctechnique_contenu] = @doctechnique_contenu WHERE [doctechnique_id] = @doctechnique_id">
        <SelectParameters>
            <asp:QueryStringParameter Name="doctechnique_id" QueryStringField="doctechnique_id"
                Type="Int32" />
        </SelectParameters>
        <DeleteParameters>
            <asp:Parameter Name="doctechnique_id" Type="Int32" />
        </DeleteParameters>
        <UpdateParameters>
            <asp:Parameter Name="entreprise_id" Type="Int32" />
            <asp:Parameter Name="doctechnique_sujet" Type="String" />
            <asp:Parameter Name="doctechnique_contenu" Type="String" />
            <asp:Parameter Name="doctechnique_id" Type="Int32" />
        </UpdateParameters>
        <InsertParameters>
            <asp:Parameter Name="entreprise_id" Type="Int32" />
            <asp:Parameter Name="doctechnique_sujet" Type="String" />
            <asp:Parameter Name="doctechnique_contenu" Type="String" />
        </InsertParameters>
    </asp:SqlDataSource>
    <asp:FormView ID="FormViewDocTech" runat="server" DataKeyNames="doctechnique_id"
        DataSourceID="SqlDocTech" DefaultMode="Insert" meta:resourcekey="FormViewDocTechResource1">
        <EditItemTemplate>
            <h1>
                <asp:Literal ID="Literal1" runat="server" meta:resourcekey="Literal1Resource1" Text="Modifier la documentation technique"></asp:Literal>
            </h1>
            <p>
                <label>
                    <asp:Literal ID="Literal2" runat="server" meta:resourcekey="Literal2Resource1" Text="<%$ Resources:TechnicalDoc, Client %>"></asp:Literal>
                </label>
                <asp:SqlDataSource ID="SqlEntreprises" runat="server" ConnectionString="<%$ ConnectionStrings:HelpDeskCS %>"
                    SelectCommand="SELECT [entreprise_id], [entreprise_nom] FROM [Entreprise] ORDER BY [entreprise_nom]">
                </asp:SqlDataSource>
                <asp:DropDownList ID="DropDownListEntreprises" runat="server" DataSourceID="SqlEntreprises"
                    DataTextField="entreprise_nom" DataValueField="entreprise_id" SelectedValue='<%# Bind("entreprise_id") %>'
                    meta:resourcekey="DropDownListEntreprisesResource1">
                </asp:DropDownList>
            </p>
            <p>
                <label>
                    <asp:Literal ID="Literal3" runat="server" meta:resourcekey="Literal3Resource1" Text="<%$ Resources:TechnicalDoc, Subject %>"></asp:Literal>
                </label>
                <asp:TextBox ID="doctechnique_sujetTextBox" runat="server" Text='<%# Bind("doctechnique_sujet") %>'
                    Columns="50" meta:resourcekey="doctechnique_sujetTextBoxResource1"></asp:TextBox></p>
            <p>
                <label>
                    <asp:Literal ID="Literal4" runat="server" meta:resourcekey="Literal4Resource1" Text="<%$ Resources:TechnicalDoc, Content %>"></asp:Literal>
                </label>
                <FCKeditorV2:FCKeditor ID="FCKeditorContenu" runat="server" Value='<%# Bind("doctechnique_contenu") %>'
                    ToolbarSet="HelpDesk" Width="500px" Height="200px">
                </FCKeditorV2:FCKeditor>
            </p>
            <p>
                <label>
                    &nbsp;</label>
                <asp:Button ID="UpdateButton" runat="server" CommandName="Update" Text="<%$ Resources:WebResource, ButtonSave %>"
                    meta:resourcekey="UpdateButtonResource1"></asp:Button>
                <asp:HyperLink ID="HyperLinkRetour" runat="server" NavigateUrl="~/Admin/DocTechnique.aspx"
                    meta:resourcekey="HyperLinkRetourResource1" Text="<%$ Resources:WebResource, ButtonCancel %>"></asp:HyperLink>
            </p>
        </EditItemTemplate>
        <InsertItemTemplate>
            <h1>
                <asp:Literal ID="Literal5" runat="server" meta:resourcekey="Literal5Resource1" Text="Nouvelle documentation technique"></asp:Literal>
            </h1>
            <p>
                <label>
                    <asp:Literal ID="Literal6" runat="server" meta:resourcekey="Literal6Resource1" Text="<%$ Resources:TechnicalDoc, Client %>"></asp:Literal>
                </label>
                <asp:SqlDataSource ID="SqlEntreprises" runat="server" ConnectionString="<%$ ConnectionStrings:HelpDeskCS %>"
                    SelectCommand="SELECT [entreprise_id], [entreprise_nom] FROM [Entreprise] ORDER BY [entreprise_nom]">
                </asp:SqlDataSource>
                <asp:DropDownList ID="DropDownListEntreprises" runat="server" DataSourceID="SqlEntreprises"
                    DataTextField="entreprise_nom" DataValueField="entreprise_id" SelectedValue='<%# Bind("entreprise_id") %>'
                    meta:resourcekey="DropDownListEntreprisesResource2">
                </asp:DropDownList>
            </p>
            <p>
                <label>
                    <asp:Literal ID="Literal7" runat="server" meta:resourcekey="Literal7Resource1" Text="<%$ Resources:TechnicalDoc, Subject %>"></asp:Literal>
                </label>
                <asp:TextBox ID="doctechnique_sujetTextBox" runat="server" Text='<%# Bind("doctechnique_sujet") %>'
                    Columns="50" meta:resourcekey="doctechnique_sujetTextBoxResource2"></asp:TextBox></p>
            <p>
                <label>
                    <asp:Literal ID="Literal8" runat="server" meta:resourcekey="Literal8Resource1" Text="<%$ Resources:TechnicalDoc, Content %>"></asp:Literal>
                </label>
                <FCKeditorV2:FCKeditor ID="FCKeditorContenu" runat="server" Value='<%# Bind("doctechnique_contenu") %>'
                    ToolbarSet="HelpDesk" Width="500px" Height="200px">
                </FCKeditorV2:FCKeditor>
            </p>
            <p>
                <label>
                    &nbsp;</label>
                <asp:Button ID="InsertButton" runat="server" CommandName="Insert" Text="<%$ Resources:WebResource, ButtonSave %>"
                    meta:resourcekey="InsertButtonResource1"></asp:Button>
                <asp:HyperLink ID="HyperLinkRetour" runat="server" NavigateUrl="~/Admin/DocTechnique.aspx"
                    meta:resourcekey="HyperLinkRetourResource2" Text="<%$ Resources:WebResource, ButtonCancel %>"></asp:HyperLink>
            </p>
        </InsertItemTemplate>
    </asp:FormView>
</asp:Content>
